package day04;
import java.util.Scanner;
public class BasicPractice {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int times=0;
        for(int x=1;x<=9;x++){
            for(int y=1;y<=9;y++){
                System.out.print(x+"*"+y+"="+x*y+" ");
                times++;
                if(times%9==0){
                    System.out.println();
                }
            }

        }
        /*


        for(int times=0;times<5;times++){
            System.out.println("行动是成功的阶梯");
        }

        for(int num=1;num<=9;num++){
            System.out.println(num+"*9="+num*9);
        }

        for(int num=1;num<=9;num+=2){
            System.out.println(num+"*9="+num*9);
        }

         */
        /*
          num=1 true 输出
          num=3 true 输出
          num=5 true 输出
          num=7 true 输出
          num=9 true 输出
          num=11 false for结束
         */

        for(int num=9;num>=1;num--){
            System.out.println(num+"*9="+num*9);
        }





        /*
        int num=(int)(Math.random()*1000+1);
        int guess;
        do{
            System.out.println("猜吧");
             guess=scan.nextInt();
             if(guess>num){
                 System.out.println("猜大了");
             }else if(guess<num){
                 System.out.println("猜小了");
             }else{
                 System.out.println("恭喜你猜对了");
             }
        }while(guess!=num);

         */



        /*
        int num=(int)(Math.random()*1000+1);
        System.out.println("猜吧");
        int guess=scan.nextInt();
        while(guess!=num){
            if(guess>num){
                System.out.println("猜大了");
            }else {
                System.out.println("猜小了");
            }
            System.out.println("猜吧");
            guess=scan.nextInt();
        }
        System.out.println("恭喜你，猜对了");

         */
        /*
        500 true true 猜大了
        250 true false 猜小了
        375 true false 猜小了
        402 false while结束
        猜对了
         */











        /*
        System.out.println("请选择您要办的业务：1.存款 2.取款 3.转账 4.退卡");
        int command=scan.nextInt();
        switch(command){
            case 1:
                System.out.println("存款");
                break;
            case 2:
                System.out.println("取款");
                break;
            case 3:
                System.out.println("转帐");
                break;
            case 4:
                System.out.println("退卡");
                break;
            default:
                System.out.println("输入错误");


        }

         */
    }

}
